<input type="hidden" class="tpl-form-input" id="solution-id" name="solution.id" value="#(solution.id??)">
<div class="am-form-group">
    <label class="am-u-sm-3 am-form-label">封面图 <span class="tpl-form-line-small-title">cover</span></label>
    <div class="am-u-sm-9">
        <div class="am-form-group am-form-file">
            <img class="" style="width: 200px;height: 150px;" alt="点击图片上传" id="up-img-touch" onerror="this.src='/admin/common/AmazeUI/img/k.jpg'" src="#(solution.cover??)" data-am-popover="{content: '点击上传', trigger: 'hover focus'}" >
            <input type="hidden" class="tpl-form-input" id="img-save-path" name="solution.cover" value="#(solution.cover??)" />
        </div>
    </div>
</div>
<div class="am-form-group">
    <label for="solution-name" class="am-u-sm-3 am-form-label">名称 <span class="tpl-form-line-small-title">name</span></label>
    <div class="am-u-sm-9">
        <input type="text" class="tpl-form-input" id="solution-name" name="solution.name" value="#(solution.name??)" placeholder="请输入案例名">
    </div>
</div>
<div class="am-form-group">
    <label for="solution-time" class="am-u-sm-3 am-form-label">发布时间 <span class="tpl-form-line-small-title">time</span></label>
    <div class="am-u-sm-9">
        <input type="text" class="am-form-field tpl-form-no-bg" id="solution-time" name="solution.time" placeholder="发布时间" value="#(solution.time??)" data-am-datepicker="" readonly="">
    </div>
</div>
<div class="am-form-group">
    <label for="solution-description" class="am-u-sm-3 am-form-label">简述 <span class="tpl-form-line-small-title">description</span></label>
    <div class="am-u-sm-9">
        <textarea class="" rows="10" id="solution-description" name="solution.description" placeholder="请输入简述">#(solution.description??)</textarea>
    </div>
</div>
<div class="am-form-group" id="content-div">
    <label for="solution-content" class="am-u-sm-3 am-form-label">内容 <span class="tpl-form-line-small-title">content</span></label>
    <div class="am-u-sm-9">
        <textarea id="solution-content" name="solution.content" style="display: none">#(solution.content??)</textarea>

        <div id="richText">#(solution.content??)</div>
        <script type="text/javascript" src="/admin/common/WangEditor3/wangEditor.min.js"></script>
        <script type="text/javascript">
            var E = window.wangEditor;
            var editor = new E('#richText');
            editor.customConfig.onchange = function (html) {
                // html 即变化之后的内容
                $('#solution-content').val(html);
            };
            editor.customConfig.customAlert = function (info) {
                layer.msg(info);
            };
            editor.customConfig.uploadImgServer = '/admin/fileUpload/imageUpload';
            editor.customConfig.uploadFileName = "image";
            editor.customConfig.uploadImgHooks = {
                customInsert: function (insertImg, result, editor) {
                    var url = result.url;
                    var path = result.path;
                    insertImg(path+url);
                }
            };
            editor.create();
        </script>
    </div>
</div>
<div class="am-form-group">
    <label class="am-u-sm-3 am-form-label">行业 <span class="tpl-form-line-small-title">industry</span></label>
    <div class="am-u-sm-9">
        <input type="text" class="am-form-field tpl-form-no-bg" id="selected-node-name" placeholder="请选择行业" readonly=""
            value="#if(solution.industry)#for(idu : industryList)#if(idu.id==solution.industry)#(idu.name)#end#end#end"
        >

        <input type="hidden" class="tpl-form-input" id="selected-node-id" name="solution.industry" value="#(solution.industry??)">

        <table width="100%" class="am-table am-table-compact am-text-nowrap tpl-table-black" style="border: 1px solid #666d70;border-radius: 0 0 6px 6px;display: none" id="select-tree">
            #for(idu : industryList)
                <tr class="select-node gradeX" value="#(idu.id)" text="#(idu.name)" style="cursor:pointer">
                    <td>
                        #for(i = 1; i < idu.level; ++i)
                            &emsp;
                        #end
                        #if(idu.childCount > 0)
                            <i class="am-icon-minus"></i>
                        #end
                        #(idu.name)
                    </td>
                </tr>
            #end
        </table>
        <script>
            $(function () {
                var $treeDom = $('#select-tree');
                $('#selected-node-name').click(function () {
                    if($treeDom.css("display") == "none")
                        $treeDom.fadeIn();
                    else
                        $treeDom.css("display", "none");
                });
                $('.select-node').click(function () {
                    $('#selected-node-name').val($(this).attr('text'));
                    $('#selected-node-id').val($(this).attr('value'));
                    $treeDom.css("display", "none");
                });

            });
        </script>
    </div>
</div>
<div class="am-form-group">
    <div class="am-u-sm-9 am-u-sm-push-3">
        <button type="submit" class="am-btn am-btn-primary tpl-btn-bg-color-success ">提交</button>
    </div>
</div>